function writerinfo() {
				var thisview = Ext.getCmp('postinfopanel1');
		    	var otherid = thisview.getData().ID;
		    	openOtherinfo(otherid)
}

Ext.define('Triends.view.Postinfo', {
	extend: 'Ext.Panel',
	xtype: 'postinfo',
	id: 'postinfo',
	config: {
		fullscreen: true,
		scrollable: true,
		showAnimation: 'slideIn',
		layout: 'vbox',
		items: [{
			xtype: 'panel',
			layout: 'hbox',
			style: {'background': '-webkit-gradient(linear, left top, left bottom, from(#FEFCFC), to(#BEBBBB))', 'padding':'15px'},
			items: [{
				xtype: 'panel',
				minWidth: '80%',
				maxWidth: '80%',
				layout: 'vbox',
				items:[{
					xtype: 'panel',
					id: 'postinfopanel1',
					tpl: [
					"<div>",
					"<b><font size='5'>{TITLE}</font></b>"
					]
				},
				{
					xtype: 'panel',
					id: 'postinfopanel2',
					tpl:[
					"<font size='2'>{WRITER}</font></h><br><h><font size='2'>{DATE}&nbsp;&nbsp;&nbsp;{TIME}</font></h>" +
					"</div>"
					],
					listeners: {
						tap: {
							element: 'element',
							fn: function() {
								writerinfo();
							}
						}
					}
				}]
			},
			{
				xtype: 'panel',
				layout: 'vbox',
				width: 60,
				items:[{
					xtype: 'panel',
					style: 'margin-bottom:3px',
					flex: 3,
					items: [{
						xtype: 'button',
						iconCls: 'trash',
						ui: 'small',
						iconMask: true,
						width: '48px',
						height: '32px',
						centered: true,
						hidden: true,
						id: 'postnormaldeletebtn',
						handler: function() {
				          	Ext.Msg.show({
			  					title: '알림',
			  					message: '삭제하시겠습니까?',
			   		            width: 300,
			   					buttons:  [{
			   						id: 'ok',
			   						text: 'Ok',
			   						ui: 'action'
			   					},
			   					{	id: 'cancel',
			   						text: 'Cancel'
			   					}],   					
			   					fn: function(buttonId) {
			       					if (buttonId == 'Ok') {
			       						var thisview = Ext.getCmp('postinfopanel1');
					    				var num = thisview.getData().Number;
					    	
			    	  					Ext.data.JsonP.request({
			   								url: 'http://itscreater.cafe24.com/Triends/PostDelete.jsp',
			   								params: {
			   									num : num
			   								},
			          						callbackKey: 'callback',
			          						success: function(result) {
			          							
			          							var postStore = Ext.getStore('poststore');
			         							postStore.load({
			         								callback: function() {
			         									navigator.app.backHistory();
			         								}
			         							});
			         				
			         							
			         						}
			    		  				});	
			       					} else if (buttonId == 'Cancel') {
			       						Ext.emptyFn
			       					}
			   					}
							});
						}
					}]
					
				},
				{
					xtype: 'spacer',
					flex: '1'
				},
				{
					xtype: 'panel',
					flex: 3,
					items:[{
						xtype: 'button',
						iconCls: 'settings',
						iconMask: true,
						width: '48px',
						height: '32px',
						ui: 'small',
						centered: true,
						hidden: true,
						id: 'postnormalmodifybtn',
						handler: function(){
							var titlemodify = Ext.getCmp("titlemodify");
							var contentmodify = Ext.getCmp("contentmodify")
							var postinfodata = Ext.getCmp("postinfopanel").getData();
							var titledata = postinfodata.TITLE;
							var contentdata = postinfodata.CONTENT;
							titlemodify.setValue(titledata);
							Ext.getCmp('postmdftitlecount').setHtml(titledata.length+'/50');
							if (contentdata.match("<br>") != null || contentdata.match("&nbsp;") != null){
								contentdata = contentdata.replace(/&nbsp;/gi, " "); /*/gi를 써서 전체 문자열을 바꿔준다 */
								contentdata = contentdata.replace(/<br>/gi, "\n");
							}
							contentmodify.setValue(contentdata);
							Ext.getCmp('postmdftextcount').setHtml(contentdata.length+'/250');
							Triends.app.getHistory().add(Ext.create('Ext.app.Action', {
            					url: 'mainpage/post/postnormalmodify'
	        				}));
						}
					}]
						
				}]
			}]
		},
		
		{
			xtype: 'panel',
			id: 'postcontentpanel',
			style: {'border-bottom':'1px #CBCAC7 solid','padding':'15px'},
			minHeight: '300px',
			tpl: ["<p><font size='3'>{CONTENT}</font></p>"]
		},
		{
 	 		xtype: 'panel',
 	 		style: 'padding-top:15px; padding-left:15px;',
 	 		items:[
 	 			{
 	 				xtype: 'panel',
 	 				style: 'margin-bottom:-10px',
 	 				html: "<p style='margin-left:5px;'><font size='4'><b>Comment</b></font></p>"
 	 			},
 	 			{
 	 				xtype: 'postnormalcomment'
 	 			}
 	 		]
 	 	}]
	}
});